/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package FrontEnd;

import javax.swing.JOptionPane;



/**
 *
 * @author Stensig
 */
public class GUIAppFrontpage extends javax.swing.JPanel {

    /**
     * Creates new form GUIAppFrontpage
     */
    public GUIAppFrontpage() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnShowTicket = new javax.swing.JButton();
        btnRoutePlanner = new javax.swing.JButton();
        labPDASeen = new javax.swing.JLabel();

        setMinimumSize(new java.awt.Dimension(250, 400));
        setPreferredSize(new java.awt.Dimension(250, 400));

        btnShowTicket.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
        btnShowTicket.setText("Show Ticket");
        btnShowTicket.setPreferredSize(new java.awt.Dimension(150, 75));
        btnShowTicket.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnShowTicketActionPerformed(evt);
            }
        });

        btnRoutePlanner.setFont(new java.awt.Font("Dialog", 0, 14)); // NOI18N
        btnRoutePlanner.setText("Route Planner");
        btnRoutePlanner.setPreferredSize(new java.awt.Dimension(150, 75));
        btnRoutePlanner.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRoutePlannerActionPerformed(evt);
            }
        });

        labPDASeen.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        labPDASeen.setText("Your device has been registered.");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(50, 50, 50)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labPDASeen, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnRoutePlanner, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnShowTicket, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 42, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(67, 67, 67)
                .addComponent(btnShowTicket, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(64, 64, 64)
                .addComponent(btnRoutePlanner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)
                .addComponent(labPDASeen)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void btnShowTicketActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnShowTicketActionPerformed
        // TODO add your handling code here:
        // UDP to vehicle computer; 
    }//GEN-LAST:event_btnShowTicketActionPerformed

    private void btnRoutePlannerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRoutePlannerActionPerformed
        String message = "Redirecting to browser. . .";
        String title = "Route Planner redirect";
        JOptionPane.showMessageDialog(this, message, title,
                                      JOptionPane.INFORMATION_MESSAGE);
        // Go to website
    }//GEN-LAST:event_btnRoutePlannerActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnRoutePlanner;
    private javax.swing.JButton btnShowTicket;
    private javax.swing.JLabel labPDASeen;
    // End of variables declaration//GEN-END:variables
}
